#ifndef NctiRenderManager_H
#define NctiRenderManager_H
#include "ncti_base.h"
#include "ncti_dcl_render.h"
namespace NCTI
{
	class NctiRenderRootModelItem;
	class NctiRenderFonts;
	class NctiDebug;
    class NctiRenderSegmentItem;
    class NctiRenderObject;
    /**
     * @brief render config manager
     */
	class DECL_NCTI_RENDER NctiRenderManager
	{
	public:
		virtual ~NctiRenderManager();
		static NctiRenderManager* instance();

        /**
         * @brief SetApplicationPath
         * @param[in] i_path work directory
         */
		void SetApplicationPath(const char* i_path);

        /**
         * @brief GetApplicationPath
         * @return work directory
         */
        const char* GetApplicationPath();

        /**
         * @brief AddRenderRootModelItem
         * @param[in] i_pRenderRootModelItem to be add
         */
		void AddRenderRootModelItem(NctiRenderRootModelItem* i_pRenderRootModelItem);

        /**
         * @brief RemoveRenderRootModelItem
         * @param[in] i_pRenderRootModelItem to be remove
         */
		void RemoveRenderRootModelItem(NctiRenderRootModelItem* i_pRenderRootModelItem);

        /**
         * @brief AddFonts
         * @param[in] i_FontsName font name
         * @param[in] i_FontsFileName font file
         */
		NctiRenderFonts* AddFonts(std::string i_FontsName, const char* i_FontsFileName);

        /**
         * @brief GetFonts
         * @param[in] i_FontsName font name
         * @return NctiRenderFonts
         */
		NctiRenderFonts* GetFonts(std::string i_FontsName);

        /**
         * @brief get all font added
         */
        std::vector<std::string> AllFonts()const;

        /**
         * @brief get the first font
         */
        std::string DeFaultFont()const;

        /**
         * @brief internal usage
         */
		Ncti_Boolean& GetOpenDebugInfo();
        /**
         * @brief internal usage
         */
        Ncti_Boolean& GetShowContour();
        /**
         * @brief internal usage
         */

         /**
          * @brief internal usage
          */
		Ncti_Boolean& GetInputDebugInfoToFile();

        /**
         * @brief internal usage
         */
		Ncti_Boolean& GetInputDebugInfoToCommand();

        /**
         * @brief display the framerate
         */
		Ncti_Boolean& GetOpenRenderDisplayTime();

        /**
         * @brief internal usage
         */
		Ncti_Boolean& GetOpenCalTime();

        /**
         * @brief preview highlight
         */
        Ncti_Boolean& GetPreHighLight();

        /**
         * @brief GetBoxSelctAll
         */
        Ncti_Boolean& GetBoxSelctAll();

        /**
         * @brief DeleteSegment
         */
        void DeleteSegment(NctiRenderSegmentItem* &i_pObj);

	private:
        NctiRenderManager();
        void *m_FT_Library = nullptr;
		char* m_ApplicationPath;

		std::vector<NctiRenderRootModelItem*> m_RenderRootModelItemVec;
		std::vector<NctiRenderFonts*> m_RenderFontsVec;
        NctiRenderFonts* m_DefualtFonts{nullptr};
        Ncti_Boolean m_PreHigh{false};
		Ncti_Boolean m_OpenDebugInfo{ false };
		Ncti_Boolean m_InputDebugInfoToFile{ false };
		Ncti_Boolean m_InputDebugInfoToCommand{ false };
        Ncti_Boolean m_OpenRenderDisplayTime{false};
		Ncti_Boolean m_OpenCalTime{ false };
        Ncti_Boolean m_BoxSelectAll{false};
        Ncti_Boolean m_ShowContour{true};
		NctiDebug* m_render_debug;
		NctiDebug* m_product_debug;

        NctiDebug* get_render_debug();
        NctiDebug* get_product_debug();
		void write_render_debug(const char* i_chValue);
		void write_product_debug(const char* i_chValue);
	};
}
#endif // !NctiRenderManager_H
